package com.taobao.me.feignclient;

import com.taobao.base.model.TokenResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 远程调用搜索接口
 */
//使用fallback定义降级类是无法拿到熔断异常,使用FallbackFactory可以拿到熔断的异常信息
@FeignClient(name = "auth-service",  configuration = AuthServiceClientFallbackFactory.class)
public interface AuthServiceClient {


    @PostMapping("/auth/oauth/check_token")
    TokenResponse checkToken(@RequestParam("token") String token);
}
